#include "myrect.h"

MyRect::MyRect(QWidget *parent) : QWidget(parent)
{

}

void MyRect::paintEvent(QPaintEvent *event)
{

    QPainter painter(this);

    QRect rect;
    rect.setX(10);
    rect.setY(10);
    rect.setWidth(100);
    rect.setHeight(100);

    QBrush bush(Qt::red);

    painter.setBrush(bush);

    painter.drawRect(rect);
}
